@echo off
call :separate %1

REM Compila
echo ### Inicio de %FILE% ######################

del %CFILE%.j
del %CFILE%.class

java Yal2Jvm %1
echo #### Fim de Compilar
echo.
java -jar jasmin.jar -d %DIR% %CFILE%.j
echo #### Fim de Jasmin
echo.
java -cp %DIR% %FILE%
echo #### Fim de Executar
echo.
echo ### Fim de %FILE% ######################
pause

goto EOF

:separate
set DRIVE=%~d1
set FILE=%~n1
set EXT=%~x1
set DIR=%DRIVE%%~p1
set CFILE=%DIR%%FILE%
exit /b 0
:EOF

